home *** CD-ROM | disk | FTP | other *** search
/ CYBER.XPO.95 / CYBER.XPO.95 (Arsenal Computer).ISO / popreq / amiga1 / dcdd_20.lha / DCDDtime.rexx < prev    next >
OS/2 REXX Batch file  |  1993-07-19  |  1KB  |  56 lines

  1. /* DCDDtime.rexx Version 1.1  - 19 July 1993 */
  2.  
  3. address command
  4.  
  5. OPTIONS RESULTS
  6.  
  7. windev = "CON:150/50/304/70/DCDDtime "
  8. if ~open('wind',windev) then exit      /* Window for all activity */
  9.  
  10. call GetTotTime
  11.  
  12. temp= '   Hours used in' date(m)':' right(thours,2,'0')':'right(tmins,2,'0')':'right(tsecs,2,'0')
  13. call wsay(' ')
  14. call wsaych(temp)
  15. call wsay(' ')
  16. call wsay(' ')
  17. call wsay('   Press Return to exit')
  18. call wsay(' ')
  19. LetMeGo = readln('wind')
  20.  
  21. exit
  22.  
  23. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  24.  *                                                             *
  25.  *                   Functions / Subroutines                   *
  26.  *                                                             *
  27.  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  28.  
  29.          /* Function - put string to window with EOL */
  30. wsay:
  31. parse arg strx
  32. call writeln('wind',strx)
  33. return
  34.  
  35.          /* Function - put string to window without EOL */
  36. wsaych:
  37. parse arg strx
  38. call writech('wind',strx)
  39. return
  40.  
  41. GetTotTime:
  42.   timetitle='DCDDtime.'left(date('S'),6)             /* DCDDtime.YYYYMM */
  43.   if open('TotTime',timetitle,'R')=0 then do /* Total hours, mins, secs */
  44.     thours = 0
  45.     tmins = 0                     /* If file doesn't exist, set to zero */
  46.     tsecs = 0
  47.   end
  48.   else do
  49.     thours=readln('TotTime')      /* If file does exist, read them */
  50.     tmins=readln('TotTime')
  51.     tsecs=readln('TotTime')
  52.     call close('TotTime')
  53.   end
  54. return
  55.  
  56.